package it.trekker.sensors;

public class AccelerometerCoord {

	private float x_axis;
	private float y_axis;
	private float z_axis;
	
	public AccelerometerCoord() {
	}
	
	public AccelerometerCoord(float x, float y, float z) {
		x_axis = x;
		y_axis = y;
		z_axis = z;
	}
	
	public AccelerometerCoord(float[] coord) {
		if(coord != null) {
			x_axis = coord[0];
			y_axis = coord[1];
			z_axis = coord[2];
		}
	}

	public float getX_axis() {
		return x_axis;
	}

	public void setX_axis(float x_axis) {
		this.x_axis = x_axis;
	}

	public float getY_axis() {
		return y_axis;
	}

	public void setY_axis(float y_axis) {
		this.y_axis = y_axis;
	}

	public float getZ_axis() {
		return z_axis;
	}

	public void setZ_axis(float z_axis) {
		this.z_axis = z_axis;
	}
	
	public void setCoordinates(float[] coord) {
		x_axis = coord[0];
		y_axis = coord[1];
		z_axis = coord[2];
	}
	
	public void getCoordinatesAsFloatArray() {
		float[] coord = new float[3];
		
		coord[0] = x_axis;
		coord[1] = y_axis;
		coord[2] = z_axis;
	}
}
